import Vue from 'vue'
import VueRouter from 'vue-router'
import Pages from './pages'
import Components from './components'

Vue.use(VueRouter)
const routes = [
    { path: '/', redirect: '/account' },
    { path:'/demo', component:Pages.Demo},
    {
        path: '/account',
        component: Pages.Account,
        redirect:'/account/login',
        children: [
            { path: 'login', component: Components.login },
            { path: 'register', component: Components.register },
        ]
    },
    {
        path: '/home',
        component: Pages.Home,
        redirect:'/home/projects',
        children: [
            { path: 'user_info', component: Pages.User_info },
            { path: 'workbench', component: Pages.Workbench },
            { path: 'edit', component: Pages.Edit },
            { path: 'projects', component: Pages.Projects}
        ]
    },

]


export default new VueRouter({
    routes
})